<template>
    <div class="app-container" @mousedown="openFull" @touchstart="openFull">
        <el-row :gutter="device == 'mobile' ? 0 : 0" v-show="showSearch">
            <el-form class="formBox formBox1 searchForm" :model="queryParams" ref="queryForm" size="small" :inline="true"
                :class="device == 'mobile' ? 'active' : ''"  label-width="68px">
                <el-form-item label="医院" prop="hospital" clearable>
                    <department :isHospital="true" :isdepat="true" @refreshData="refreshData" deptWidth="200px"
                        ref="department">
                    </department>
                </el-form-item>

                <el-form-item label="日期">
                    <el-date-picker v-model="dateRange" style="width: 240px" value-format="yyyy-MM-dd" type="daterange"
                        range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions"
                        @change="handleQuery"></el-date-picker>
                </el-form-item>
                <el-form-item>
                    <el-button type="primary" size="mini" @click="todayCount">今日治疗</el-button>
                </el-form-item>
                <el-form-item v-if="device == 'mobile'">
                    <div class="formBox-text active">总人次
                        <span class="color1">{{ todayTreatmentObj.total ? todayTreatmentObj.total : 0 }}</span>，已完成
                        <span class="color2">{{ todayTreatmentObj.isTreatment ? todayTreatmentObj.isTreatment : 0
                        }}</span>，待治疗
                        <span class="color3">{{ todayTreatmentObj.notTreatment ? todayTreatmentObj.notTreatment : 0
                        }}</span>
                    </div>
                </el-form-item>
                <el-row :gutter="20" class="mb8" v-if="device == 'mobile'">

                    <el-input v-model="querydetailParams.patientId" placeholder="请输入顾客ID" clearable
                        style="width: 160px;margin:5px;" @keyup.enter.native="handleQuery0" size="mini" />

                    <el-input v-model="querydetailParams.visitNum" placeholder="请输入顾客编号" clearable
                        style="width: 160px;margin:5px;" @keyup.enter.native="handleQuery0" size="mini" />

                    <el-input v-model="querydetailParams.patientName" placeholder="请输入顾客姓名" clearable
                        style="width: 160px;margin:5px;" @keyup.enter.native="handleQuery0" size="mini" />
                    <el-select v-model="querydetailParams.status" placeholder="请选择治疗状态" clearable
                        style="width: 160px;margin:5px;" @change="handleQuery0" size="mini">
                        <el-option label="待治疗" value="0"></el-option>
                        <el-option label="已完成" value="1"></el-option>
                    </el-select>

                    <el-button type="primary" icon="el-icon-search" size="mini" style="margin:5px;"
                        @click="handleQuery0">搜索</el-button>

                    <!--                        <right-toolbar :showSearch.sync="showSearch" @queryTable="handleQuery"></right-toolbar>-->
                </el-row>
                <div v-if="device == 'mobile'">
                    <el-tabs v-model="activeName" @tab-click="handleClick" class="tabsLine">
                        <el-tab-pane :name="index.toString()" v-for="(listItem, index) in dataList" :key="listItem.id">
                            <div slot="label">
                                <div class="tabsLine_label_item">
                                    <div class="tabsLine_label_item_title">
                                        <div class="tabsLine_label_item_title_content">
                                            {{ listItem.treatmentName }}
                                        </div>
                                        <div class="tabsLine_label_item_num">
                                            (<span class="color1">{{ listItem.total }}</span>/<span class="color2">{{
                                                listItem.isTreatment }}</span>)
                                        </div>
                                    </div>


                                </div>
                            </div>
                        </el-tab-pane>

                    </el-tabs>
                </div>
            </el-form>
            <!--专病数据-->
            <div class="formBox formBox-header searchForm" v-if="device != 'mobile'">
                <div class="formBox-text">治疗人次
                    <span class="color1">{{ todayTreatmentObj.total ? todayTreatmentObj.total : 0 }}</span>人次，已完成
                    <span class="color2">{{ todayTreatmentObj.isTreatment ? todayTreatmentObj.isTreatment : 0
                    }}</span>人次，待治疗
                    <span class="color3">{{ todayTreatmentObj.notTreatment ? todayTreatmentObj.notTreatment : 0 }}</span>人次
                </div>
            </div>
        </el-row>
        <el-row :gutter="device == 'mobile' ? 0 : 0">
            <el-col :xs="24" :sm="24" :md="9" :lg="9" :xl="9" v-if="device != 'mobile'">
                <div class="formBox searchForm" style="margin-bottom:0px!important;">
                    <el-row :gutter="10" class="mb8">
                        <el-col :span="1.5">
                            <el-button type="primary" plain icon="el-icon-plus" size="mini"
                                @click="handleAdd">确费签到</el-button>
                        </el-col>
                        <el-col :span="12">
                            <el-select v-model="selectValue" @change="searchItem" size="mini"
                                @clear="refreshGettodayTreatmentByName" clearable filterable placeholder="请选择治疗i项目">
                                <el-option v-for="(item, index) in selectList" :key="index" :label="item.treatmentName"
                                    :value="item.treatmentName">
                                </el-option>
                            </el-select>
                        </el-col>
                        <right-toolbar :showSearch.sync="showSearch"
                            @queryTable="refreshGettodayTreatmentByName"></right-toolbar>
                    </el-row>
                    <!-- @cell-mouse-enter="cursor" -->
                    <div ref="statisticalTable0">
                        <el-table v-loading="loading" border :data="dataList" :row-class-name="tableRowClassName"
                            class="treatRable" @row-click="handleLook" :height="statisticalTableH0" ref="table0">
                            <el-table-column sortable label="治疗项目" align="center" prop="treatmentName"
                                :show-overflow-tooltip="true" width="150">
                            </el-table-column>
                            <el-table-column label="总人数" sortable align="center" prop="total" :show-overflow-tooltip="true"
                                width="90">
                                <template slot-scope="scope">
                                    <span class="scopecolor1">{{ scope.row.total }}</span>
                                </template>
                            </el-table-column>
                            <el-table-column label="已完成" sortable align="center" prop="isTreatment"
                                :show-overflow-tooltip="true" width="90">
                                <template slot-scope="scope">
                                    <span class="scopecolor2">{{ scope.row.isTreatment }}</span>
                                </template>
                            </el-table-column>
                            <el-table-column label="待治疗" sortable align="center" prop="notTreatment"
                                :show-overflow-tooltip="true">
                                <template slot-scope="scope">
                                    <span class="scopecolor3">{{ scope.row.notTreatment }}</span>
                                </template>
                            </el-table-column>

                        </el-table>
                    </div>


                </div>
            </el-col>
            <el-col :xs="24" :sm="24" :md="device == 'mobile' ? 24 : 15" :lg="device == 'mobile' ? 24 : 15"
                :xl="device == 'mobile' ? 24 : 15" style="padding:0px;">

                <div class="formBox tableformBox searchForm" :class="device == 'mobile' ? 'active' : ''" style="margin-bottom:0px!important;">
                    <el-row :gutter="20" class="mb8" v-if="device != 'mobile'">

                        <el-input v-model="querydetailParams.patientId" placeholder="请输入顾客ID" clearable
                            style="width: 160px;margin:5px;" @keyup.enter.native="handleQuery0" size="mini" />

                        <el-input v-model="querydetailParams.visitNum" placeholder="请输入顾客编号" clearable
                            style="width: 160px;margin:5px;" @keyup.enter.native="handleQuery0" size="mini" />

                        <el-input v-model="querydetailParams.patientName" placeholder="请输入顾客姓名" clearable
                            style="width: 160px;margin:5px;" @keyup.enter.native="handleQuery0" size="mini" />
                        <el-select v-model="querydetailParams.status" placeholder="请选择治疗状态" clearable
                            style="width: 160px;margin:5px;" @change="handleQuery0" size="mini">
                            <el-option label="待治疗" value="0"></el-option>
                            <el-option label="已完成" value="1"></el-option>
                        </el-select>

                        <el-button type="primary" icon="el-icon-search" size="mini" style="margin:5px;"
                            @click="handleQuery0">搜索</el-button>

                                              
                    </el-row>
                    <el-row :gutter="20" class="mb8">
                        <el-col :span="20">
                            治疗项目: <span style="color:red">{{ querydetailParams.treatmentName ?
                                querydetailParams.treatmentName : '全部' }}</span>
                        </el-col>
                        <right-toolbar :showSearch.sync="showSearch" @queryTable="handleQuery0"></right-toolbar>
                    </el-row>
                    <div ref="statisticalTable1">
                        <el-table border v-loading="loading" :data="datailList" :height="statisticalTableH1" ref="table1">

                            <el-table-column label="顾客ID" sortable align="center" prop="patientId" width="85"
                                :show-overflow-tooltip="true" :height="statisticalTableH1" ref="table1">

                            </el-table-column>
                            <el-table-column label="顾客编号" sortable align="center" prop="visitNum" width="150"
                                :show-overflow-tooltip="true">

                            </el-table-column>
                            <el-table-column sortable label="治疗项目" align="center" prop="treatmentName"
                                :show-overflow-tooltip="true" width="150">
                            </el-table-column>
                            <el-table-column label="姓名" align="center" prop="patientName" :show-overflow-tooltip="true"
                                width="90">
                            </el-table-column>
                            <el-table-column label="治疗状态" align="center" prop="status" :show-overflow-tooltip="true"
                                width="80">
                                <template slot-scope="scope">
                                    <span v-if="scope.row.status == 1" style="color:blue">已完成</span>
                                    <span v-else style="color:red">待治疗</span>
                                </template>
                            </el-table-column>
                            <el-table-column label="性别" align="center" prop="patientSex" :show-overflow-tooltip="true"
                                width="50">
                                <template slot-scope="scope">
                                    <dict-tag :options="dict.type.sys_user_sex" :value="scope.row.patientSex" />
                                </template>
                            </el-table-column>
                            <el-table-column label="年龄" align="center" prop="patientAge" :show-overflow-tooltip="true"
                                width="50" />
                            <el-table-column label="医生诊断" align="center" prop="diagnosis" :show-overflow-tooltip="true"
                                width="200" />
                            <el-table-column label="医生方案" align="center" prop="diagnosisPlan" :show-overflow-tooltip="true"
                                width="300" />
                            <el-table-column label="类型" align="center" prop="type" :show-overflow-tooltip="true"
                                width="100">
                                <template slot-scope="scope">
                                    <span v-if="scope.row.type == 0" style="color:blue">确费</span>
                                    <span v-else style="color:red">签到</span>
                                </template>
                            </el-table-column>
                            <el-table-column label="创建时间" align="center" prop="createTime" :show-overflow-tooltip="true"
                                width="160" />
                            <el-table-column label="操作" align="center" fixed="right"
                                :width="device == 'mobile' ? '260' : '180'" class-name="small-padding fixed-width">
                                <template slot-scope="scope">
                                    <el-button :size="device == 'mobile' ? 'small' : 'mini'"
                                        style="margin-bottom:0px;margin-left:4px;"
                                        :type="device == 'mobile' ? 'primary' : 'text'" icon="el-icon-circle-plus-outline"
                                        v-if="scope.row.status === '0'" v-hasPermi="['treatmentWorkstation:todayTreat:add']"
                                        @click="handleUpdate(scope.row)">记录</el-button>
                                    <el-button :size="device == 'mobile' ? 'small' : 'mini'"
                                        style="margin-bottom:0px;margin-left:4px;"
                                        :type="device == 'mobile' ? 'primary' : 'text'" icon="el-icon-edit"
                                        v-if="scope.row.status === '1'"
                                        v-hasPermi="['treatmentWorkstation:todayTreat:edit']"
                                        @click="handleEdit(scope.row)">修改</el-button>
                                    <el-button :size="device == 'mobile' ? 'small' : 'mini'"
                                        style="margin-bottom:0px;margin-left:4px;"
                                        :type="device == 'mobile' ? 'success' : 'text'" icon="el-icon-document"
                                        v-hasPermi="['treatmentWorkstation:todayTreat:history']"
                                        @click="showtreatHistoryDialogVisible(scope.row)">历史</el-button>
                                    <el-button :size="device == 'mobile' ? 'small' : 'mini'"
                                        style="margin-bottom:0px;margin-left:4px;"
                                        :type="device == 'mobile' ? 'success' : 'text'" icon="el-icon-user"
                                        v-hasPermi="['treatmentWorkstation:todayTreat:detail']"
                                        @click="goDetail(scope.row)">详情</el-button>
                                </template>
                            </el-table-column>
                        </el-table>
                        <!-- v-show="querydetailtotal > 0" -->
                        <pagination  :total="querydetailtotal"
                            :page.sync="querydetailParams.pageNum" :limit.sync="querydetailParams.pageSize"
                            @pagination="getdatailList" />
                    </div>

                </div>
            </el-col>
        </el-row>
        <!-- 添加或修改顾客信息对话框 -->
        <el-dialog :title="newTitle" :visible.sync="newVisible" width="85%" append-to-body :close-on-click-modal="false"
            :before-close="closeRecord" v-dialogDrag>
            <confirmAttend v-if="newVisible" @closerecordVisible="closerecordVisible"></confirmAttend>
        </el-dialog>

        <el-dialog :title="recordTitle" :visible.sync="recordVisible" :width="device == 'mobile' ? '100%' : '85%'"
            append-to-body class="nopaddingDailog" :class="device !== 'mobile' ? '' : 'active'"
            :close-on-click-modal="false" v-dialogDrag>
            <treatmentDetail v-if="recordVisible" :recordbaseInfo="recordbaseInfo" :submitStatus="submitStatus"
                @closerecordDialogVisible="closerecordDialogVisible"></treatmentDetail>
        </el-dialog>
        <!-- 治疗历史 -->
        <el-dialog title="治疗历史" :visible.sync="treatHistoryDialogVisible" width="85%" append-to-body v-dialogDrag
            :close-on-click-modal="false">
            <treatmentHistory v-if="treatHistoryDialogVisible" :basicInfo="patientItem"></treatmentHistory>
        </el-dialog>
        <!-- 详情 -->
        <el-dialog v-dialogDrag :class="device !== 'mobile' ? '' : 'active'" :close-on-click-modal="false"
            :title="detailTitle" :visible.sync="detailDialogVisible" :width="device !== 'mobile' ? '85%' : '100%'" center
            class="nopaddingDailog">
            <CustomerDetails v-if="detailDialogVisible" :basicInfo="baseInfo"></CustomerDetails>
        </el-dialog>
        <Screenfull v-show="false" ref="Screenfull"></Screenfull>
    </div>
</template>

<script>
import { mapGetters } from "vuex";
import { getToken } from "@/utils/auth";
import confirmAttend from "@/views/components/confirmAttend/confirmAttend"
import treatmentDetail from "@/views/components/customerDetail/treatmentDetail";
import treatmentHistory from "@/views/components/customerDetail/treatmentHistory";
import CustomerDetails from "@/views/components/customerDetail/customerDetail";
import Screenfull from "@/components/Screenfull";
import department from "@/views/components/department/index.vue";
import {
    todayTreatmentByName,
    signList,
    todayTreatment,

} from "@/api/comfirmAttend/comfirmAttend";
export default {
    name: "todayTreat",
    dicts: [
        "sys_user_sex",
    ],
    components: { confirmAttend, treatmentDetail, treatmentHistory, Screenfull, CustomerDetails, department },
    data() {
        return {
            pickerOptions: {
                disabledDate(time) {
                    return time.getTime() > Date.now() - 8.64e6;  //如果没有后面的-8.64e6就是不可以选择今天的
                },
                shortcuts: [{
                    text: '今天',
                    onClick(picker) {
                        const end = new Date();
                        const start = new Date();
                        picker.$emit('pick', [start, end]);
                    }
                }, {
                    text: '昨天',
                    onClick(picker) {
                        const date = new Date();
                        date.setTime(date.getTime() - 3600 * 1000 * 24);
                        const end = date;
                        const start = date;
                        picker.$emit('pick', [start, end]);
                    }
                }, {
                    text: '前天',
                    onClick(picker) {
                        const date = new Date();
                        date.setTime(date.getTime() - 3600 * 1000 * 24 * 2);
                        const end = date;
                        const start = date;
                        picker.$emit('pick', [start, end]);
                    }
                }, {
                    text: '最近一周',
                    onClick(picker) {
                        const end = new Date();
                        const start = new Date();
                        start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
                        picker.$emit('pick', [start, end]);
                    }
                }, {
                    text: '最近一个月',
                    onClick(picker) {
                        const end = new Date();
                        const start = new Date();
                        start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
                        picker.$emit('pick', [start, end]);
                    }
                }, {
                    text: '最近三个月',
                    onClick(picker) {
                        const end = new Date();
                        const start = new Date();
                        start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
                        picker.$emit('pick', [start, end]);
                    }
                }, {
                    text: '最近六个月',
                    onClick(picker) {
                        const end = new Date();
                        const start = new Date();
                        start.setTime(start.getTime() - 3600 * 1000 * 24 * 180);
                        picker.$emit('pick', [start, end]);
                    }
                }, {
                    text: '最近1年',
                    onClick(picker) {
                        const end = new Date();
                        const start = new Date();
                        start.setTime(start.getTime() - 3600 * 1000 * 24 * 365);
                        picker.$emit('pick', [start, end]);
                    }
                }]
            },
            doctorList: [],
            todayTreatmentObj: {},
            newTitle: '',
            newVisible: false,
            submitStatus: true,
            recordTitle: '治疗录入',
            recordVisible: false,
            recordbaseInfo: { updateStatus: true, isrecordId: undefined },
            selectValue: '',
            selectList: '',
            dataList: [

            ],
            datailList: [

            ],
            // 遮罩层
            loading: true,
            // 选中数组

            // 非单个禁用
            single: true,
            // 非多个禁用
            multiple: true,
            // 显示搜索条件
            showSearch: true,
            // 总条数
            total: 0,
            querydetailtotal: 0,
            // 查询参数
            queryParams: {
                pageNum: 1,
                pageSize: 10,
                deptId: undefined, // deptId: 0,
                hospitalId: undefined,
            },
            querydetailParams: {
                pageNum: 1,
                pageSize: 15,
                treatmentName: '',
                visitNum: '',
                patientName: '',
                patientId: '',
                deptId: undefined, // deptId: 0,
                hospitalId: undefined,
            },
            type: 0,
            open: false,
            rowIndex: 0,
            //历史弹出框
            treatHistoryDialogVisible: false,
            patientItem: {},
            // 日期范围
            dateRange: [],
            activeName: "0",
            detailTitle: "",
            detailDialogVisible: false,
            baseInfo: {},
            statisticalTableH0: undefined,
            statisticalTableH1: undefined,
        };
    },
    watch: {
        showSearch() {
            this.$nextTick(() => {
                this.changeHeight()
            }, 1000)

        }
    },
    created() {
        this.dateRange = this.defaultTime

    },
    updated() {
        this.$nextTick(() => {
            if(this.$refs.table0){
                this.$refs.table0.doLayout()
            }
            if(this.$refs.table1){
                this.$refs.table1.doLayout()
            }
           
           
        })
    },
    mounted() {
        this.changeHeight()
    },
    computed: {
        ...mapGetters(["device"]),
        defaultTime: function () {
            let date = new Date();
            let year = date.getFullYear();
            let month = date.getMonth() + 1;
            let day = date.getDate();
            month = month > 9 ? month : "0" + month;
            day = day < 10 ? "0" + day : day;
            let today = year + "-" + month + "-" + day;
            return [today, today];
        },
    },
    methods: {
        changeHeight() {
            if (this.$refs.statisticalTable0) {
                const statisticalTableObj0 = this.$refs.statisticalTable0.getBoundingClientRect();
                let h = statisticalTableObj0.top + 24
                this.statisticalTableH0 = 'calc(100vh - ' + h + 'px)'
            } else {
                this.statisticalTableH0 = '500px'
            }
            if (this.$refs.statisticalTable1) {
                const statisticalTableObj1 = this.$refs.statisticalTable1.getBoundingClientRect();
                let h = statisticalTableObj1.top + 62
                this.statisticalTableH1= 'calc(100vh - ' + h + 'px)'
            } else {
                this.statisticalTableH1 = '500px'
            }
        },
        refreshData(data) {
            this.queryParams.pageNum = 1;
            this.queryParams.hospitalId = data.hospitalId;
            this.queryParams.deptId = data.deptId;
            this.querydetailParams.hospitalId = data.hospitalId;
            this.querydetailParams.deptId = data.deptId;
            this.loading = false
            this.gettodayTreatment()
            this.gettodayTreatmentByName()
        },
        openFull() {
            if (this.device == 'mobile') {
                this.$refs.Screenfull.open()
            }

        },
        handleClick(tab, event) {
            console.log(tab.index)
            this.activeName = tab.index.toString()
            // this.activeNameStatus = false
            this.rowIndex = tab.index
            this.querydetailParams.pageNum = 1
            this.type = 0
            this.querydetailParams.treatmentName = this.dataList[this.rowIndex].treatmentName
            this.getdatailList()
        },
        gettabsLabel(item) {

        },
        closerecordVisible() {
            this.handleQuery()
            this.newVisible = false
        },
        todayCount() {
            this.dateRange = this.defaultTime
            this.handleQuery()
        },
        handleQuery() {
            this.querydetailParams.pageNum = 1
            this.gettodayTreatment()
            this.gettodayTreatmentByName()
        },
        closerecordDialogVisible() {
            this.handleQuery()
            this.recordVisible = false
        },
        tableRowClassName({ row, rowIndex }) {
            if (rowIndex === this.rowIndex) {
                return 'success-row';
            }
            return '';
        },
        handleAdd() {
            this.newTitle = '新增确费签到'
            this.newVisible = true
        },
        closeRecord() {
            this.newVisible = false
        },
        searchItem() {

            this.dataList = this.selectList.filter(item => {
                return item.treatmentName == this.selectValue
            })
            this.rowIndex = this.selectList.findIndex(item => item.treatmentName == this.selectValue);
            this.querydetailParams.pageNum = 1
            this.querydetailParams.treatmentName = this.selectValue
            this.getdatailList()
            console.log('searchItem++', this.dataList)
        },
        refreshGettodayTreatmentByName() {
            this.selectValue = ''
            this.rowIndex = 0
            this.gettodayTreatmentByName()
        },
        gettodayTreatment() {
            todayTreatment(this.addDateRange(this.queryParams, this.dateRange)).then(
                (response) => {
                    if (response.code == 200) {
                        this.todayTreatmentObj = response.data

                    }
                }
            )
        },
        gettodayTreatmentByName() {
            todayTreatmentByName(this.addDateRange(this.queryParams, this.dateRange)).then(
                (response) => {
                    if (response.code == 200) {
                        let data = response.data
                        this.dataList = data
                        this.selectList = data
                        if (data && data.length > 0) {
                            console.log('gettodayTreatmentByName--', data)
                            // this.querydetailParams.treatmentName = data[0].treatmentName
                            if (this.type == 1) {
                                this.querydetailParams.treatmentName = ''
                                this.getdatailList()
                            } else {
                                this.querydetailParams.treatmentName = data[this.rowIndex].treatmentName
                                this.getdatailList()
                            }

                        } else {
                            this.querydetailParams.treatmentName = ''
                            this.getdatailList()
                        }
                    }
                }
            )
        },
        handleQuery0() {
            this.selectValue = ''
            this.querydetailParams.pageNum = 1
            this.querydetailParams.treatmentName = ''
            this.type = 1
            this.gettodayTreatmentByName()
        },

        getdatailList() {
            signList(this.addDateRange(this.querydetailParams, this.dateRange)).then(
                (response) => {
                    if (response.code == 200) {
                        this.datailList = response.rows
                        this.querydetailtotal = response.total
                    }
                }
            )
        },
        handleLook(row, column, event) {
            this.rowIndex = this.dataList.findIndex(item => item.treatmentName == row.treatmentName);
            // let index=this.rowIndex
            console.log(this.rowIndex)
            this.querydetailParams.pageNum = 1
            this.type = 0
            this.querydetailParams.treatmentName = this.dataList[this.rowIndex].treatmentName
            this.getdatailList()
        },
        cancel() {

        },
        // 记录
        handleUpdate(row) {
            console.log(row)
            this.recordbaseInfo = row
            this.recordbaseInfo.updateStatus = true
            this.recordbaseInfo.isrecordId = row.treatmentName
            this.submitStatus = true
            this.recordVisible = true

        },
        //修改
        handleEdit(row) {
            console.log(row)
            this.recordbaseInfo = row
            this.recordbaseInfo.updateStatus = false
            this.recordbaseInfo.isrecordId = row.treatmentName
            this.submitStatus = false
            this.recordVisible = true

        },
        showtreatHistoryDialogVisible(row) {
            this.patientItem = row
            console.log('showtreatHistoryDialogVisible--', row)
            this.treatHistoryDialogVisible = true
        },
        goDetail(row) {
            this.detailTitle = '顾客详情'
            this.baseInfo = row
            this.detailDialogVisible = true
        },

    },
};
</script>
<style scoped lang="scss">
.tableformBox{
    margin:0 10px;
}
.formBox.active {
    padding-bottom: 10px;
    margin-bottom: 10px;
    padding: 10px !important;
}

.tabsLine_label_item {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60px;

}

.tabsLine_label_item_title {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tabsLine_label_item_title_content {
    font-size: 16px;
}

.tabsLine_label_item_num .color1,
.tabsLine_label_item_num .color2 {
    font-size: 18px !important;
}

::v-deep .el-table.treatRable .success-row {
    background: rgba(50, 175, 22, 0.5);
}

::v-deep .treatRable .el-table__row:hover>td {
    background: rgba(50, 175, 22, 0.5) !important;
}

.formBox-header {
    text-align: center;
}

.formBox-title {
    font-size: 28px;
    font-weight: 700;
}

.formBox-text {
    font-size: 14px;
    line-height: 30px;
}

.formBox-text.active .color1,
.formBox-text.active .color2,
.formBox-text.active .color3 {
    font-size: 16px !important;
}

.scopecolor1 {
    font-size: 16px;
    line-height: 30px;
    color: rgb(253, 7, 216);
}

.scopecolor2 {
    font-size: 16px;
    line-height: 30px;
    color: blue;
}

.scopecolor3 {
    font-size: 16px;
    line-height: 30px;
    color: red;
}

.color1 {
    font-size: 24px;
    line-height: 30px;
    color: rgb(253, 7, 216);
    margin: 0 8px;
}

.color2 {
    font-size: 24px;
    line-height: 30px;
    color: blue;
    margin: 0 8px;
}

.color3 {
    font-size: 24px;
    line-height: 30px;
    color: red;
    margin: 0 8px;
}
</style>
